<?php
namespace app\api\controller\v1;
use app\api\controller\Common;

class Convert extends Common{
	var $modelDb;
	public function _initialize(){
		parent::_initialize();
		$this->modelDb = model("Convert");
	}
	public function lists(){
	    $where['userid'] = $this->uinfo['id'];
	    //$where['userid'] = 6;
	    $where['typeid'] = 1;
		$list = model("Jifen")->list_data($where, 0, 0, 'id, userid, taskid, contentid');
		$lists = [];
		foreach ($list as $v) {
            $info = model("Convert")->get_data(['item_id'=>$v['contentid']]);
            $v['price'] = $info['price'];
            $v['thumb'] = $info['thumb'];
            $v['thumb'] = $info['thumb'];
            $v['content'] = $info['content'];
            $v['endtime'] = $info['endtime'];
            $v['description'] = $info['description'];
            $lists[] = $v;
                       
        }
        return $this->app_success($list);
    	
	}
	
}